<template>
  <div>
    <div class="home-top">
      <div class="home-login">
        <span style="color: #fff">访客欢迎您～&nbsp;</span><a style="color: #0078e5">登录</a>
      </div>
      <div class="home-input clearfix">
        <div class="home-input-left">
          <i class="i-search"></i>
          <input type="text" placeholder="人名、地名、机构或事件">
        </div>
        <div class="home-input-right">
          <span style="color: #fff">搜索</span>
        </div>
      </div>
    </div>
    <section class="home-section">
      <div class="monitor-title clearfix">
        <p class="bold">舆情监测、舆情预警、舆情日报</p>
        <i></i>
        <span>查看全部</span>
      </div>
      <div v-if="hasKey ==true">
        <div class="monitor-content">
          <ul>
            <li class="clearfix" v-for="(item,index) in monitorList" :key="index">
              <p class="bold">{{ item.name }}</p>
              <div>
                <button style="border-color: #c6c4c4" @click="monitorDetail(item.name)">{{ item.information }}</button>
                <button style="color: #ff0000">{{ item.warning }}</button>
                <button style="color: #f37903">{{ item.daily }}</button>
              </div>
            </li>
          </ul>
        </div>
      </div>
      <div v-else>
        <div class="monitor-content-no">
          <div class="no-data">
            <i class="no-dataPic"></i>
            <span>您还没有设置监测方案</span>
          </div>
          <div class="create-data">
            <span>现在可以：</span>
            <button style="background-color: #0078e5">查看案例</button>
            <router-link :to="'/createMonitor'">
              <button style="background-color: #f37903">新建方案</button>
            </router-link>
          </div>
        </div>
      </div>
    </section>
    <section class="home-section">
      <div class="monitor-title">
        <p class="bold">竞品分析</p>
      </div>
      <div class="analysis-content">
        <div class="analysis-detail">
          <span class="a-case">案例</span>
        </div>
        <div class="analysis-detail">
          <span class="a-new">新建</span>
        </div>
        <div class="analysis-detail analysis-detail-1">
          <span class="a-report">报告</span>
        </div>
      </div>
    </section>
    <section class="home-section">
      <div class="about-detail">
        <div class="about-all all-1">
          <span class="a-order">我的订单</span>
        </div>
        <div class="about-all all-1">
          <span class="a-renewal">续费管理</span>
        </div>
        <div class="about-all all-2" @click="$router.push('/like')">
          <span class="a-collection">收藏夹</span>
        </div>
        <div class="about-all all-3">
          <span class="a-on">关于我们</span>
        </div>
        <div class="about-all all-3">
          <span class="a-question">常见问题</span>
        </div>
        <div class="about-all">
          <span class="a-service">联系客服</span>
        </div>
      </div>
    </section>
    <section class="home-section" style="overflow: hidden">
      <div class="another-detail">
        <div class="another-all">
          <div class="pc-net clearfix">
            <div class="pc-net-left"></div>
            <div class="pc-net-right">
              <span class="bold">深度舆情电脑版</span>
              <p>功能更多、操作更简单、方便</p>
            </div>
          </div>
          <div class="app-net clearfix">
            <div class="app-net-left"></div>
            <div class="app-net-right">
              <span class="bold">深度舆情APP</span>
              <p>随时随地&nbsp;掌控新动态</p>
            </div>
            <button>APP下载</button>
          </div>
        </div>
      </div>
    </section>
  </div>
</template>

<script>
  export default {
    name: "home",
    data() {
      return {
        monitorList: [{
          name: '马云',
          information: '信息列表',
          warning: '预警',
          daily: '日报'
        },{
          name: '腾讯',
          information: '信息列表',
          warning: '预警',
          daily: '日报'
        },{
          name: '网易',
          information: '信息列表',
          warning: '预警',
          daily: '日报'
        }],
        hasKey:false
      }
    },
    methods:{
      monitorDetail(val){
        console.log(val);
      }
    }
  }
</script>

<style scoped lang="less">
  @import '../../style/mixin';

  /* 首页顶部 */
  .home-top {
    margin: 0 auto;
    position: relative;
    width: 750px;
    height: 344px;
    background: url("../../assets/home/home_bg@2x.png") no-repeat center;
    background-size: 750px 344px;
    overflow: hidden;
    .home-login {
      margin: 22px 0 0 32px;
      font-size: 32px; /*px*/
      span {
        padding-left: 50px;
        background: url("../../assets/home/home_person@2x.png") no-repeat left center;
        background-size: 26px 26px;
      }
    }
    .home-input {
      position: absolute;
      width: 686px;
      height: 74px;
      background-color: #eee;
      border-radius: 88px;
      left: 32px;
      bottom: 23px;
      .home-input-left {
        width: 522px;
        height: 74px;
        float: left;
        display: flex;
        align-items: center;
      }
      .home-input-right {
        float: left;
        width: 164px;
        height: 74px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #05469b;
        border-bottom-right-radius: 88px;
        border-top-right-radius: 88px;
      }
      .i-search {
        display: inline-block;
        float: left;
        width: 32px;
        height: 32px;
        line-height: 32px;
        background: url("../../assets/home/home_search@2x.png") no-repeat center;
        background-size: 32px 32px;
        margin: 21px 16px 21px 20px;
      }
      input {
        width: 420px;
        padding: 10px 0;
        background-color: #eee;
      }
    }
  }

  [data-dpr='3'] .home-top {
    background: url("../../assets/home/home_bg@3x.png") no-repeat center;
    background-size: 750px 344px;
    .home-login {
      span {
        background: url("../../assets/home/home_person@3x.png") no-repeat left center;
        background-size: 26px 26px;
      }
    }
    .home-input {
      .i-search {
        background: url("../../assets/home/home_search@3x.png") no-repeat center;
        background-size: 32px 32px;
      }
    }
  }

  /* section */
  .home-section {
    margin-top: 28px;
    .monitor-title {
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 720px;
      height: 60px;
      color: #fff;
      border-top-left-radius: 8px;
      border-top-right-radius: 8px;
      background-color: #05469b;
      p {
        padding-left: 17px;
      }
      i {
        flex: 1;
      }
      span {
        display: block;
        font-size: 26px; /*px*/
        margin-right: 17px;
        padding-right: 25px;
        background: url("../../assets/home/home_enter@2x.png") no-repeat right center;
        background-size: 13px 24px;
      }
    }
    .monitor-content {
      margin: 0 auto;
      width: 720px;
      height: 268px;
      background-color: #fdfeff;
      border-bottom-left-radius: 8px;
      border-bottom-right-radius: 8px;
      box-shadow: 0 2px 6px rgba(8, 41, 85, 0.08);
      ul {
        overflow: hidden;
        li {
          width: 100%;
          height: 88px;
          line-height: 88px;
          p {
            float: left;
            margin-left: 17px;
            padding-left: 46px;
            font-size: 30px; /*px*/
            color: #05469b;
            background: url("../../assets/home/home_icon@2x.png") no-repeat left center;
            background-size: 28px 28px;
          }
          div {
            float: right;
            margin-right: 17px;
            font-size: 26px; /*px*/
            button {
              background-color: #fdfeff;
              margin-left: 18px;
              padding: 6px 20px;
              border-width: 2px;
              border-style: solid;
              border-radius: 88px;
            }
          }
        }
        li + li {
          border-top: 2px solid #e6ebf1; /*px*/
        }
      }
    }
    .monitor-content-no{
      margin: 0 auto;
      width: 720px;
      height: 358px;
      background-color: #fdfeff;
      border-bottom-left-radius: 8px;
      border-bottom-right-radius: 8px;
      box-shadow: 0 2px 6px rgba(8, 41, 85, 0.08);
      .no-data{
        display: flex;
        justify-content: center;
        padding-top: 115px;
        padding-bottom: 72px;
        i{
          display: inline-block;
          width: 66px;
          height: 66px;
          background: url("../../assets/home/home_none@2x.png") center;
          background-size: 66px 66px;
          margin-right: 16px;
          vertical-align: middle;
        }
        span{
          line-height: 66px;
          color: #2c343d;
        }
      }
      .create-data{
        span{
          color: #34343e;
          padding-left: 67px;
        }
        button{
          color: #fff;
          padding: 15px 31px;
          border-radius: 10px;
          margin-right: 20px;
        }
      }
    }
    .analysis-content {
      margin: 0 auto;
      width: 720px;
      height: 208px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background-color: #fdfeff;
      border-bottom-left-radius: 8px;
      border-bottom-right-radius: 8px;
      box-shadow: 0 2px 6px rgba(8, 41, 85, 0.08);
      .analysis-detail {
        width: 238px;
        height: 150px;
        display: flex;
        justify-content: center;
        align-items: center;
        border-right: 2px solid #e6ebf1; /*px*/
        span {
          display: inline-block;
          padding-left: 20px;
          padding-right: 20px;
        }
        .a-case {
          padding-top: 72px;
          background: url("../../assets/home/home_case@2x.png") no-repeat top center;
          background-size: 46px 52px;
        }
        .a-new {
          padding-top: 75px;
          background: url("../../assets/home/home_add@2x.png") no-repeat top center;
          background-size: 54px 55px;
        }
        .a-report {
          padding-top: 73px;
          background: url("../../assets/home/home_report@2x.png") no-repeat top center;
          background-size: 47px 53px;
        }
      }
    }
    .about-detail {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      margin: 0 auto;
      width: 720px;
      height: 330px;
      background-color: #fdfeff;
      box-shadow: 0 2px 6px rgba(8, 41, 85, 0.08);
      border-radius: 8px;
      .about-all {
        width: 238px;
        height: 164px;
        display: flex;
        justify-content: center;
        align-items: center;
        span {
          display: inline-block;
          padding-left: 20px;
          padding-right: 20px;
        }
        .a-order {
          padding-top: 63px;
          background: url("../../assets/home/home_order@2x.png") no-repeat top center;
          background-size: 40px 47px;
        }
        .a-renewal {
          padding-top: 62px;
          background: url("../../assets/home/home_renew@2x.png") no-repeat top center;
          background-size: 46px 46px;
        }
        .a-collection {
          padding-top: 56px;
          background: url("../../assets/home/home_like@2x.png") no-repeat top center;
          background-size: 46px 40px;
        }
        .a-on {
          padding-top: 64px;
          background: url("../../assets/home/home_about@2x.png") no-repeat top center;
          background-size: 48px 48px;
        }
        .a-question {
          padding-top: 64px;
          background: url("../../assets/home/home_problem@2x.png") no-repeat top center;
          background-size: 48px 48px;
        }
        .a-service {
          padding-top: 64px;
          background: url("../../assets/home/home_service@2x.png") no-repeat top center;
          background-size: 50px 48px;
        }
      }
      .all-1 {
        border-right: 2px solid #e6ebf1; /*px*/
        border-bottom: 2px solid #e6ebf1; /*px*/
      }
      .all-2 {
        border-bottom: 2px solid #e6ebf1; /*px*/
      }
      .all-3 {
        border-right: 2px solid #e6ebf1; /*px*/
      }
    }
    .another-detail {
      position: relative;
      overflow: hidden;
      margin: 0 auto 28px auto;
      display: flex;
      align-items: center;
      width: 720px;
      height: 246px;
      background-color: #fdfeff;
      box-shadow: 0 2px 6px rgba(8, 41, 85, 0.08);
      border-radius: 8px;
      .another-all {
        width: 100%;
      }
      .pc-net {
        margin-left: 17px;
        overflow: hidden;
        .pc-net-left {
          float: left;
          width: 38px;
          height: 30px;
          margin-top: 4px;
          background: url("../../assets/home/home_pc@2x.png") no-repeat center;
          background-size: 38px 30px;
        }
        .pc-net-right {
          float: left;
          margin-left: 16px;
          p {
            padding-top: 10px;
            font-size: 24px; /*px*/
            color: #727285;
          }
        }
      }
      .app-net {
        position: relative;
        margin-top: 30px;
        margin-left: 22px;
        overflow: hidden;
        button {
          position: absolute;
          bottom: 0;
          right: 17px;
          width: 162px;
          height: 54px;
          background-color: #f37903;
          border-radius: 5px;
          font-size: 24px;
          color: #fff;
        }
        .app-net-left {
          float: left;
          width: 26px;
          height: 38px;
          margin-top: 4px;
          background: url("../../assets/home/home_app@2x.png") no-repeat center;
          background-size: 26px 38px;
        }
        .app-net-right {
          float: left;
          margin-left: 23px;
          p {
            padding-top: 10px;
            font-size: 24px; /*px*/
            color: #727285;
          }
        }
      }
    }
  }

  [data-dpr='3'] .home-section {
    .monitor-title span {
      background: url("../../assets/home/home_enter@3x.png") no-repeat right center;
      background-size: 13px 24px;
    }
    .monitor-content ul li p {
      background: url("../../assets/home/home_icon@3x.png") no-repeat left center;
      background-size: 28px 28px;
    }
    .monitor-content-no .no-data i{
      background: url("../../assets/home/home_none@3x.png") center;
      background-size: 66px 66px;
    }
    .analysis-content {
      .a-case {
        padding-top: 72px;
        background: url("../../assets/home/home_case@3x.png") no-repeat top center;
        background-size: 46px 52px;
      }
      .a-new {
        padding-top: 75px;
        background: url("../../assets/home/home_add@3x.png") no-repeat top center;
        background-size: 54px 55px;
      }
      .a-report {
        padding-top: 73px;
        background: url("../../assets/home/home_report@3x.png") no-repeat top center;
        background-size: 47px 53px;
      }
    }
    .about-detail {
      .a-order {
        padding-top: 63px;
        background: url("../../assets/home/home_order@3x.png") no-repeat top center;
        background-size: 40px 47px;
      }
      .a-renewal {
        padding-top: 62px;
        background: url("../../assets/home/home_renew@3x.png") no-repeat top center;
        background-size: 46px 46px;
      }
      .a-collection {
        padding-top: 56px;
        background: url("../../assets/home/home_like@3x.png") no-repeat top center;
        background-size: 46px 40px;
      }
      .a-on {
        padding-top: 64px;
        background: url("../../assets/home/home_about@3x.png") no-repeat top center;
        background-size: 48px 48px;
      }
      .a-question {
        padding-top: 64px;
        background: url("../../assets/home/home_problem@3x.png") no-repeat top center;
        background-size: 48px 48px;
      }
      .a-service {
        padding-top: 64px;
        background: url("../../assets/home/home_service@3x.png") no-repeat top center;
        background-size: 50px 48px;
      }
    }
    .another-detail {
      .pc-net-left {
        background: url("../../assets/home/home_pc@3x.png") no-repeat center;
        background-size: 38px 30px;
      }
      .app-net-left {
        background: url("../../assets/home/home_app@2x.png") no-repeat center;
        background-size: 26px 38px;
      }
    }
  }
</style>
